<?php

/**
 * \file
 * Classe `bool`.
 */

namespace pilar\Entities\Fields /* \cond */ ; /* \endcond */
{

/**
 * Champ booléen.
 *
 * \since 09/10/2008
 * \author Matthieu OVIEDO <matthieu.oviedo@gmail.com>
 */
class Bool extends Field {

protected function loadDefaultParams() {
 parent::loadDefaultParams();
 
 $this->params->set(array(
  'defaultValue' => 'false'
 ));
}


public function sqlProperties() {
 return 'ENUM(\'false\', \'true\') NOT NULL DEFAULT \''.$this->get('defaultValue').'\'';
}


/*public function isEmpty($value) {
	if ($value == 'true' || $value == 'false') {
		return true;
	}
	return false;
}*/


} // Class.

} // Namespace.

?>
